package com.creatshare.bean;

import java.util.List;

public class Page {
	private int currentPage;
	private int pageSize;

	private int recordSize;
	private List recordList;
	private int startIndex;
	private int pageCount;

	/**
	 * @param currentPage
	 * @param pageSize
	 * @param recordSize
	 * @param recordList
	 */
	public Page(int currentPage, int pageSize, int recordSize) {
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.recordSize = recordSize;
		this.pageCount = (recordSize + pageSize - 1) / pageSize;
		this.startIndex = (currentPage - 1) * pageSize + 1;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getRecordSize() {
		return recordSize;
	}

	public void setRecordSize(int recordSize) {
		this.recordSize = recordSize;
	}

	public List getRecordList() {
		return recordList;
	}

	public void setRecordList(List recordList) {
		this.recordList = recordList;
	}

	public int getPageCount() {
		return pageCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public int getStartIndex() {
		return startIndex;
	}

	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}
	
}
